home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d27 / crit11.arc / CRITTER.DOC next >
Text File  |  1990-05-13  |  18KB  |  411 lines

  1.                            A Critical Error Handler
  2.                      Copyright 1990 by TANSTAAFL Software
  3.                          Version 1.10 May 13, 1990
  4.  
  5.     CRITTER is a terminate and stay resident critical error handler.
  6.     CRITTER replaces DOS's "abort, retry, ignore" message with a pop-up
  7.     window that restores the screen when finished processing the error.
  8.     This version of CRITTER adds an automatic response, where the user
  9.     can specify a response to be supplied at a certain time after the
  10.     error occurs.  Possible responses can include Abort, Retry, Ignore,
  11.     Fail, Soft reboot, or Hard reboot.
  12.  
  13.     Instructions For Use
  14.     --------------------
  15.  
  16.         At some point in your AUTOEXEC.BAT file, type in the command
  17.         'CRITTER'.  The command line parameters below may also be
  18.         inserted.
  19.  
  20.         CRITTER [/U] [/M] [/S] [/Boptions] [/Toptions] [/Noptions]
  21.                 [/Aresponse] [/Otimeout]
  22.  
  23.                 /U      Unload the TSR.  Like all TSR's that allow
  24.                         themselves to be unloaded, this feature only
  25.                         works if this TSR was the last one loaded.
  26.                         This TSR will unload correctly from high DOS
  27.                         RAM (above 640K).
  28.  
  29.                 /M      Monochrome switch.  This allows correct
  30.                         display on monochrome monitors connected
  31.                         to color display adapters.
  32.  
  33.                 /S      Sound switch.  This turns off the beep when
  34.                         an error is detected.  Normally a beep is
  35.                         generated to signal an error.
  36.  
  37.                 /B      Allows setting border colors (see below).
  38.  
  39.                 /T      Allows setting title colors (see below).
  40.  
  41.                 /N      Allows setting normal text colors (see below).
  42.  
  43.                 /A      Allows automatic response to an error.
  44.                         Response can be one of the following:
  45.  
  46.                         Response Action         Response Action
  47.                         ---------------------------------------
  48.  
  49.                         A        Abort          R        Retry
  50.                         I        Ignore         F        Fail
  51.                         S        Soft reboot    H        Hard reboot
  52.  
  53.                 /O      Allows user to specify the number of seconds
  54.                         to wait for a user response before triggering
  55.                         the automatic response specified by the /A
  56.                         option.  If /A is specified and /O is not, no
  57.                         screen will be shown and the automatic response
  58.                         will take effect immediately.
  59.  
  60.         Color Options
  61.         -------------
  62.  
  63.         Each color command is followed by characters that determine the
  64.         color to use.  Each color is designated by a single character, as
  65.         indicated by the chart below.  If the character is in upper case,
  66.         it sets the background color.  A lower case character sets the
  67.         foreground color.  Adding a [+] to the string makes the fore-
  68.         ground color bright, while adding a [*] makes it blink.  Color
  69.         commands may be used in any order.
  70.  
  71.         Color           Character       Color           Character
  72.         ---------------------------------------------------------
  73.         Black           K, k            Blue            B, b
  74.         Green           G, g            Cyan            C, c
  75.         Red             R, r            Magenta         M, m
  76.         Yellow          Y, y            White           W, w
  77.  
  78.         Bright          +               Blink           *
  79.  
  80.         Examples
  81.  
  82.         /bwK            border is dim white on black
  83.         /ty+*R          title is blinking bright yellow on red
  84.         /ncB            text is cyan on blue
  85.  
  86.         Automatic Response
  87.         ------------------
  88.  
  89.         The automatic response feature allows the user to specify a
  90.         default action and timeout duration.  If a critical error occurs
  91.         and the timeout value is specified, CRITTER shows the error
  92.         window and waits for a key to be pressed as usual (A-abort,
  93.         R-retry, etc).  The window will now contain an extra countdown
  94.         timer line.  If the user does not respond before this count
  95.         reaches zero, then the automatic response is triggered.  All
  96.         four possible responses to the error are supported (Abort, Retry,
  97.         Ignore, and Fail).  Not all errors support all responses, however,
  98.         Abort is always enabled, as is Fail on DOS versions 3.x and 4.x.
  99.  
  100.         The automatic response unit can also reboot the computer as a
  101.         default response.  Either a hard (reset) or soft (Ctrl-Alt-Del)
  102.         reboot can be triggered.  This is useful for network or BBS
  103.         systems that must run unattended.
  104.  
  105.         The soft reboot feature does not work consistently on some PCs.
  106.         This seems to be caused by minor BIOS incompatibilities.  Before
  107.         relying on a soft reboot, test it once to insure it works on
  108.         your computer.
  109.  
  110.     Critical Error Handler Theory
  111.     -----------------------------
  112.  
  113.         Critical errors are caused by hardware errors, generally in disk
  114.         drives.  These errors may be minor (such as printer out of paper,
  115.         or drive door open) or fairly catastrophic (like a scrambled FAT
  116.         or dead hard disk).  A critical error can be caused by virtually
  117.         any DOS call EXCEPT interrupts 25h and 26h (Absolute Disk Read &
  118.         Write).  A critical error is associated with a device and can be
  119.         either a block device (disk drives) or a character device
  120.         (printer, keyboard, clock, etc.).  Each time the error handler
  121.         is called, parameters are passed that indicate which error
  122.         occured and where it happened.
  123.  
  124.         The DOS critical error handler is entered via software interrupt
  125.         24.  DOS will allow a program to replace the DOS critical error
  126.         handler with its own, but only for the duration of program
  127.         execution.  When the program exits, DOS replaces the address of
  128.         the program's handler, routing all further critical errors to DOS.
  129.         CRITTER patches the resident portion of COMMAND.COM so that
  130.         CRITTER has control of critical errors.  The disk file COMMAND.COM
  131.         is NOT changed.  Due to the unusual way DOS handles INT 24,
  132.         CRITTER can only be unloaded with the /U command line option.  If
  133.         a TSR manager is used (such as MARK and RELEASE), the resident
  134.         portion of COMMAND.COM will not be "unpatched" and the next
  135.         critical error will cause the computer to loop until reset.
  136.         
  137.         The CRITTER critical error handler will give the following
  138.         information:
  139.  
  140.                 Error (DOS)     Write protected disk
  141.                                 Unknown unit
  142.                                 Drive not ready
  143.                                 Unknown command
  144.                                 CRC error in data
  145.                                 Bad drive request
  146.                                 Seek error
  147.                                 Unknown media type
  148.                                 Sector not found
  149.                                 Printer out of paper
  150.                                 Write fault
  151.                                 Read fault
  152.                                 General failure
  153.                                 Sharing violation
  154.                                 Lock violation
  155.                                 Invalid disk change
  156.                                 FCB unavailable
  157.                                 Sharing buffer overflow
  158.  
  159.                 Error (Network) Network busy
  160.                                 Network device no longer exists
  161.                                 NetBIOS command limit exceeded
  162.                                 Network adapter hardware error
  163.                                 Incorrect response from network
  164.                                 Incompatible remote adapter
  165.                                 Print queue full
  166.                                 Not enough space for print file
  167.                                 Print file was deleted
  168.                                 Network name was deleted
  169.                 Error Cause     Read operation
  170.                                 Write operation
  171.  
  172.                 Error Location  System area
  173.                                 File Allocation Table
  174.                                 Directory
  175.                                 Data area
  176.                                 Internal copy of FAT
  177.  
  178.                 Other Info      (char)  Device name
  179.                                 (block) Drive designator
  180.  
  181.         Possible responses to a critical error are Abort, Ignore, Retry,
  182.         or Fail.  Not all responses are possible at all times -- it
  183.         depends on the error and the version of DOS.  The CRITTER software
  184.         enables only those responses that DOS will allow at the time.
  185.  
  186.     Test Results
  187.     ------------
  188.  
  189.         Unfortunately, this software is hard to completely test.  Several
  190.         easy errors can be generated.  These include the write protect
  191.         error, the drive not ready error, the paper out error, and the
  192.         read & write faults.  Other errors could be tested if they were
  193.         physically produced, such as unplugging the clock chip or crashing
  194.         the hard disk (not recommended).
  195.  
  196.         CRITTER was tested with various DOS versions from 2.1 up through
  197.         4.01.  It was tested with various programs and was found to allow
  198.         the tested program to install its own error handler for the
  199.         duration of its execution.  Upon return to DOS, CRITTER continued
  200.         to handle errors correctly.  For those text mode programs that
  201.         don't install their own error handlers, CRITTER takes care of it
  202.         for them.
  203.  
  204.         CRITTER should work with all programs (either by working or by
  205.         getting out of the way); it has been tested with the following
  206.         programs:
  207.  
  208.         Brief 3.0                       Dbase III Plus
  209.         Quattro Professional            Paradox 3.0
  210.         Procomm Plus                    PC Tools 5.5 & 6.0
  211.         Windows 2.1                     Microsoft C 5.1
  212.         Turbo C 2.0                     Microsoft Assembler 5.1
  213.  
  214.         CRITTER does not work in the DOS compatibility box under OS/2.
  215.  
  216.         In the event that the display is in graphics mode, CRITTER will
  217.         use the DOS handler.  This will result in the screen being
  218.         scrolled.  Most programs that use graphics modes do contain their
  219.         own critical error handlers.
  220.  
  221.     Files In This Archive Include:
  222.     ------------------------------
  223.  
  224.         critter.doc     (this file)
  225.         critter.exe     CRITTER program
  226.  
  227.  
  228.     Future Enhancements
  229.     -------------------
  230.  
  231.         A version of CRITTER for OS/2 is both desirable and difficult.
  232.         The way OS/2 handles critical errors does not make a TSR such as
  233.         CRITTER a viable solution.  However, other avenues are currently
  234.         being pursued.
  235.  
  236.         Graphics modes are another obstacle.  Currently, CRITTER defaults
  237.         to using the existing DOS critical error handler in all graphics
  238.         modes.  Being able to accurately detect the current graphics mode
  239.         and display over graphics (and restore) is probably not possible,
  240.         although it is being researched.
  241.  
  242.         Later versions of MS-DOS (3.0 and above) include an interrupt to
  243.         get extended error information.  The next version of CRITTER is
  244.         likely to include this extended information.
  245.  
  246.         All users are invited to suggest enhancements.  See below
  247.         for communications addresses.
  248.  
  249.     Terms And Conditions
  250.     --------------------
  251.  
  252.         You may use this software freely in any non-military environment.
  253.         You may distribute this software freely as long as the archive
  254.         file contains all of the files mentioned above.  This software
  255.         (Version 1.1) expires after December 31, 1990, and will display
  256.         a message to that effect.  Once purchased, a registered version
  257.         will not have this restriction.
  258.  
  259.         The following purchasing terms are available:
  260.  
  261.         Standard Registration                                   $ 20
  262.         Latest version, disk size of your choice.
  263.  
  264.         Shareware Distribution License                          $100
  265.         Special version for shareware authors wishing to
  266.         distribute CRITTER with their products.  Allows
  267.         unlimited distribution.
  268.  
  269.         Source Code in C and Assembler                          $200 *
  270.         Includes the unusual tricks we used to get CRITTER to
  271.         work and well-commented source code.
  272.  
  273.         Commercial Distribution License                         $300
  274.         Special version for authors of commercial software,
  275.         allows unlimited distribution.  With source code.
  276.  
  277.         And of course, if your mailing address is in Colorado,
  278.         include sales tax (currently 7.1%).
  279.  
  280.         If you desire a site license or are a special interest
  281.         group, contact the authors.
  282.  
  283.         * Microsoft C v5.1 and the Microsoft Macro Assembler v5.1
  284.           are required to assemble and/or compile the source.
  285.  
  286.     Communications
  287.     --------------
  288.  
  289.         We may be reached by the following methods for feedback:
  290.  
  291.         on GENIE        mail address TANSTAAFL  (for Dana Cline)
  292.  
  293.         on Prodigy      mail address NCDC07A    (for Dana Cline)
  294.  
  295.         on CompuServe   mail address 74606,525  (for Dean McCrory)
  296.  
  297.         by phone        (303) 989-7389 After 8 AM and before
  298.                         10 PM MST (Thanks!).  I do have an
  299.                         answering machine, which has an unlimited
  300.                         message length.  I am generally not in
  301.                         during the day (I have to work, too).
  302.  
  303.         by mail         Dana W. Cline  
  304.                         TANSTAAFL Software
  305.                         P. O. Box 260075
  306.                         Lakewood, CO  80226
  307.  
  308.         Feedback of all types is appreciated.
  309.  
  310.     Disclaimer
  311.     ----------
  312.  
  313.         The authors claim no responsibility for any damages caused by the
  314.         use or misuse of this product.  This product is distributed "as is"
  315.         with no warranty expressed or implied.  The authors will not be
  316.         responsible for any losses incurred, either directly or indirectly,
  317.         by the use or misuse of this product.  The authors reserve the
  318.         right to make modifications at any time.  Prices are subject to
  319.         change without notice.
  320.  
  321.     Thanks to:
  322.     ----------
  323.  
  324.         Dean McCrory, for making CRITTER go TSR!
  325.         Holly Miller, for much help on this manual.
  326.         Jerry Pournelle, for continually harping about the drawbacks
  327.             of MS-DOS.
  328.         Floyd Pretz, for suggesting the automatic response feature.
  329.  
  330.     Information Sources:
  331.     --------------------
  332.  
  333.         MS-DOS Programmer's Reference, from Microsoft Press
  334.         MS-DOS Developer's Guide, from the Waite Group
  335.         Microsoft C 5.1 Manual, from Microsoft
  336.         MS-DOS Functions, from Microsoft Press
  337.  
  338.     Trademarks
  339.     ----------
  340.  
  341.         Because of the nature of this manual, numerous software products are
  342.         mentioned by their trade names.  In most, if not all, cases these
  343.         designations are claimed as trademarks by the respective companies.
  344.  
  345.                                   Order Form
  346.                               TANSTAAFL Software
  347.  
  348.  
  349.         NAME:     ______________________________________________________
  350.  
  351.         COMPANY:  ______________________________________________________
  352.  
  353.         ADDRESS:  ______________________________________________________
  354.  
  355.                   ______________________________________________________
  356.  
  357.         CITY:     ______________________________________________________
  358.  
  359.         STATE:    ________________________  ZIP CODE:  _________________
  360.  
  361.         PHONE:    ______________________________________________________
  362.  
  363.         E-MAIL ADDRESS:  _______________________________________________
  364.  
  365.         WHERE DID YOU RECEIVE CRITTER?  ________________________________
  366.  
  367.         ________________________________________________________________
  368.  
  369.         DISK SIZE NEEDED: [  ] 3-1/2      [  ] 5-1/4
  370.  
  371.         COMMENTS:  _____________________________________________________
  372.  
  373.         ________________________________________________________________
  374.  
  375.         ________________________________________________________________
  376.  
  377.         Basic Registration              @ $ 20.00             __________
  378.  
  379.         Shareware Distribution License  @ $100.00             __________
  380.  
  381.         Source Code in C and Assembler  @ $200.00             __________
  382.  
  383.         Commercial Distribution License @ $300.00             __________
  384.  
  385.         Colorado sales tax              @ 7.1 %               __________
  386.  
  387.         Non-US Shipping @ $5.00                               __________
  388.             (Payments must be in US Dollars, US bank)
  389.  
  390.                                                     TOTAL:   $__________
  391.  
  392.         Checks or money orders only.  Cash is accepted but
  393.         discouraged.  Absolutely no company P.O's!
  394.  
  395.         Remit to:         Dana W. Cline
  396.                           TANSTAAFL Software
  397.                           P.O. Box 260075
  398.                           Lakewood, CO  80226
  399.  
  400.         Version History
  401.         ---------------
  402.  
  403.         Version         Date            Features / Bug Fixes
  404.         ----------------------------------------------------
  405.  
  406.         1.00            04/26/90        Original release.
  407.  
  408.         1.10            05/11/90        Automatic response and
  409.                                         timeout feature added.
  410.  
  411.